package com.dgut.controller;

import com.dgut.pojo.Grade;
import com.dgut.vo.ResultVO;
import com.dgut.service.GradeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("grade")
@ResponseBody
public class GradeController {
    @Resource
    private GradeService gradeService;
    @RequestMapping(value = "list",method = RequestMethod.GET)
    public ResultVO<Grade> query() {
        List<Grade> gradeList = (List<Grade>) gradeService.query();
        return new ResultVO<>(gradeList);
    }
}
